﻿#ifndef PLANSFORM_H
#define PLANSFORM_H

#include <QWidget>
#include <QScrollBar>
#include <Dlg/plandlg.h>

namespace Ui {
class PlansForm;
}

class PlansForm : public QWidget
{
    Q_OBJECT



public:
    explicit PlansForm(QWidget *parent = nullptr);
    ~PlansForm();

    void InitPage();

    void UpdateTable();

public slots:
    void slotsDlgInfo();
private slots:
    void on_Bt_PrePage_clicked();

    void on_Bt_NextPage_clicked();

    void OnSlideAction(int nRowIndex);

    void on_Bt_Add_clicked();

    void on_Bt_Change_clicked();

    void on_Bt_Search_clicked();

    void on_Bt_Delete_clicked();

    void on_tableWidget_cellClicked(int row, int column);

    void on_tableWidget_cellDoubleClicked(int row, int column);

private:
    Ui::PlansForm *ui;


    QVector<int> m_vecData;

    int m_nCurPage; //当前页数
    int m_nRowsPerPage; // 每页显示的行数
    int m_nTotalPages;  // 表格总页数

    QString m_strCurID;

    SqliteUtil m_sql;
};

#endif // PLANSFORM_H
